package com.suge.order.dao.dataobject;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class UserBizOrderDO {

	private long id;
	
	private String userNick;
	
	private long userId;
	
	private String  messageInfo;
	
	private int messageTypeId;
	
	private long messageSentCount;
	
	private long validMessageCount;
	
	private String noSendUsers;
	
	private int status;
	
	private Map<Integer,Long> messageInfoMap = new HashMap<Integer,Long> ();
	
	private String attribute;
	
	private Date gmtCreate;
	
	private Date gmtModified;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getUserNick() {
		return userNick;
	}

	public void setUserNick(String userNick) {
		this.userNick = userNick;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public int getMessageTypeId() {
		return messageTypeId;
	}

	public void setMessageTypeId(int messageTypeId) {
		this.messageTypeId = messageTypeId;
	}

	public long getMessageSentCount() {
		return messageSentCount;
	}

	public void setMessageSentCount(long messageSentCount) {
		this.messageSentCount = messageSentCount;
	}

	public long getValidMessageCount() {
		return validMessageCount;
	}

	public void setValidMessageCount(long validMessageCount) {
		this.validMessageCount = validMessageCount;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public Date getGmtModified() {
		return gmtModified;
	}

	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}

	public void setAttribute(String attribute) {
		this.attribute = attribute;
	}

	public String getAttribute() {
		return attribute;
	}

	public void setMessageInfo(String messageInfo) {
		this.messageInfo = messageInfo;
	}

	public String getMessageInfo() {
		return messageInfo;
	}

	public void setMessageInfoMap(Map<Integer,Long> messageInfoMap) {
		this.messageInfoMap = messageInfoMap;
	}

	public Map<Integer,Long> getMessageInfoMap() {
		if(this.messageInfo!=null && this.messageInfo.length()>1 && this.messageInfoMap.size()<1){
			String [] messageInfoArray = messageInfo.split(";");
			for(String str : messageInfoArray){
				String [] messageInfoDetailArray = str.split(":");
				this.messageInfoMap.put(Integer.parseInt(messageInfoDetailArray[0]), Long.parseLong(messageInfoDetailArray[1]));
			}
		}
		return messageInfoMap;
	}

	public void setNoSendUsers(String noSendUsers) {
		this.noSendUsers = noSendUsers;
	}

	public String getNoSendUsers() {
		return noSendUsers;
	}
	
	
}
